import { _decorator, Component, Node, tween, Vec3 } from 'cc';
import { ZTool } from '../AshFramework/Utils/ZTool';
const { ccclass, property } = _decorator;

@ccclass('BulletHit')
export class BulletHit extends Component {

    show(worldPos: Vec3, angle: number) {
        this.node.setWorldPosition(worldPos);
        const randAngle = ZTool.GetRandom(-5, 5);
        this.node.angle = angle + randAngle;
        this.scheduleOnce(() => { this.node.destroy() }, 0.1);
    }

}


